package org.opu.vcforms.datasource;

import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;

/**
 *
 * @author yura
 */
public class Storage implements Iterable<LocalStorege>{
    private Set<LocalStorege> data;

    public Storage(Collection<Map> data) {
        this.data = new LinkedHashSet<LocalStorege>();
        for (Map map : data) {
            this.data.add(new LocalStorege(map));
        }
    }

    public Storage(Set<LocalStorege> data) {
        this.data = data;
    }

    @Override
    public Iterator<LocalStorege> iterator() {
        return data.iterator();
    }
}
